// SPDX-FileCopyrightText: 2023-2025 Sangfor Technologies Inc.
// SPDX-License-Identifier: Mulan PSL v2
package com.geniusai.aip.auth.domain;

import lombok.Data;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;

import static com.geniusai.aip.auth.constants.LoadConstants.PASSWORD_FORMAT;

/**
 * @author hml14563
 * @date 2021/3/22
 */
@Data
public class ChangePasswordEntity {

    @NotNull(message = "没有对应的用户")
    private String account;

    @NotNull(message = "新密码不能为空")
    @Pattern(regexp = PASSWORD_FORMAT, message = "密码格式不正确")
    private String newPwd;

    @NotNull(message = "原密码不能为空")
    private String oldPwd;
}
